
import request from '@/utils/request'
import axios from 'axios'
import { getToken } from '@/utils/auth'


export function getTownList(data) {
    return request({
        url: '/api/village/gettownlist',
        method: 'get',
        params:data
    })
}
export function getcitycountrylist(data) {
    return request({
        url: '/api/town/getcitycountrylist',
        method: 'get',
        params:data
    })
}
//获取所有未授权的村庄
export function getVillageList(data) {
    return request({
        url: '/api/village/getvillagelistnoconnection',
        method: 'get',
        params:data
    })
}

//获取所有村庄
export function getAllVillageList(data) {
    return request({
        url: '/api/village/getvillagelist',
        method: 'get',
        params:data
    })
}
//获取所有村庄，返回镇名
export function getAllVillageListSkip(data) {
    return request({
        url: '/api/village/getvillagelistskip',
        method: 'get',
        params:data
    })
}

export function getMyLinkVillage(){
    return request({
        url: '/api/authorizerelation/getlinkvillage',
        method: 'post',
    })
}

//三院获取所有的区县底图底数
export function getlist(listquery) {
    return request({
        url: '/api/receivedara/getlist',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data: listquery
    })
}
export function getlistdown(listquery) {
    return request({
        url: '/api/receivedara/getlistdown',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data: listquery
    })
}
//地图底数领取统计
export function getlistall(listquery) {
    return request({
        url: '/api/receivedara/getlistall',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data: listquery
    })
}
export function add(data) {
    return request({
        url: '/api/receivedara/add',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data:data,
    })
}
export function edit(data) {
    return request({
        url: '/api/receivedara/edit',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data:data,
    })
}
export function del(id){
    return request({
        url: '/api/receivedara/del',
        method: 'post',
        headers: {
            "Content-Type": "application/json"
        },
        data:id,
    })
}

